<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>正则表达式</title>
	</head>
	<body>
		<script type="text/javascript">
			var emailRule = /^\w+@.{3,}$/;
			//alert(emailRule.test("123@qq.com"));
			var telRule = new RegExp(/^[1]\d{10}$/);
			alert(telRule.test("12345678901"))
		</script>
	</body>
</html>